from tinyshop.common.setup import setup_wd
from tinyshop.common.shopping_cart_test import tinyshop_fd
import time
class case1:
    def case_pay_money(self,li,expect):
        s = setup_wd()
        t = tinyshop_fd(s.wd)
        t.alltest(li[0],li[1],li[2],li[3],li[4],li[5],li[8])
        time.sleep(2)
        op = open(r'C:\Users\Administrator\Desktop\caseall\log.txt','a+')
        try:
            re = s.wd.find_element_by_id('pay_name').text
            if re == '预存款支付':
                print(expect)
                op.write('%s\n测试结果通过\n\n'%(li))
        except:
            print(expect)
            op.write('%s\n测试结果未通过\n\n'%(li))